package dpDemo

func doWork() {
	nums := []int{1, 2, 3, 4, 5}
	target := 5
	dp := make([]int, len(nums))
	for i := 0; i < len(nums); i++ {
		for j := nums[i]; j < target; j++ {
			dp[j] = max(dp[j], dp[j-nums[i]]+nums[i])
		}
	}
}
